Contents
Exploits
Privacy
Texts
Products
Tutorial
Ethics
Windows NT
Linux
Programming
Dictionary
Hype
Chat
Phreaking
Links
Email
Home
Search
Programming

One of the oldest definitions of a hacker is a master programmer who often uses unorthodox methods in his/her code. For any computer user, knowing a programming language can be very helpful in understanding how systems work. The amount of work put into applications we casually use day after day is mind-boggling, and deserves a high measure of respect.

In case you're interested, I started programming by learning QBasic when I was 14. Just this year I went on to pick up C, C++.


C and C++
Assembly
Java
Perl


C and C++

C is considered by many to be the worldwide standard programming language. Designed by Bell Labs, it is a high-level compiled language that is used for programming on a variety of platforms. C++, introduced in 1981, is an extension of C and is replacing it as the most popular programming language. Programs written in C++ are efficient and fast, and the language isn't too difficult to learn. It's important to note that a C/C++ program will only run on the class of processor it was compiled on. In other words, you cannot run a program compiled on an Intel 486 chip on a Power PC system. However, because C++ has no specifically built-in input/output statements, code can be easily ported from system to system. ANSI C is also the language exploits are most frequently coded in.

ANSI C "Hello World" Program

      /* Prints "Hello World" to the screen /*
 	#include <stdio.h>
	main()
	{
    	printf("Hello World\n");
    	return 0;
	} 

C++ Windows "Hello World" Program

      // hello.cpp
      // Creates a window with the title "Hello World"
	#include <afxwin.h>

	class CMainWindow : public CFrameWnd {
	public:
 	  CMainWindow() { Create(NULL,"Hello World!"); }
	};

	class CHelloApp : public CWinApp {
	public:
 	  virtual BOOL InitInstance() {
       	  m_pMainWnd = new CMainWindow();
           	  m_pMainWnd->ShowWindow(m_nCmdShow);
       	  m_pMainWnd->UpdateWindow();
       	  return TRUE;
  	 }
	};

	CHelloApp HelloApp;  // HelloApp's constructor initializes and runs the app

Links
Ask the C++ Pro
DevCentral Tutorials
C Programming, v2.6
Programmer's Source
C Hot Lists and Resources
Programmer's Oasis C/C++
The GNU-Win32 Project Page
Viper's C/C++ Web Page
Ten Commandments for C Programmers
The Unofficial Borland C++ Builder Page
The ISO/ANSI C++ Draft
Memory Management in C++
C++ FAQ
Introduction to OOP Using C++
C/C++ Programmer's Vendor List
Programming in C
Visual C++ Resources
The Ground Cero Guide To C
Introductory C
Allegro



Free Compilers
Delorie DJGPP
Bloodshed DevC
Miracle C
LCC
EiC
TenDRA


Assembly

Assembly Language is as low-level as programming gets. It involves writing directly to CPU registers and memory addresses, using integrated processor functions such as MOV and XOR. It is the hardest language to learn, since it takes a tremendous amount of code to perform even the most mundane tasks. A program with the same functionality can be written much more easily in a higher-level language such as Pascal or C. However, knowing some Assembly gives you tremendous insight into how computers operate. Practically, it is usually used in applications where speed is critical, such as intensive math calculations or writing to graphics boards. Assembly is also the language computer virii are written in.

x86 Assembly "Hello World" Program


	title Hello World Program (hello.asm) 
	; This program displays "Hello, world!"

	.model small
	.stack 100h
	.code
	
	main proc
       	  mov ax,@data
       	  mov ds,ax 

       	  mov ah,9
       	  mov dx,offset hello_message
      	  int 21h 

     	 	  mov ax,4C00h
      	  int 21h
	main endp 

	.data
	hello_message  db  'Hello, world!',0dh,0ah,'$' 

	end  main

Links
Assembly Internet Resources
The Netwide Assembler Project
Interrupt List
x86 CPU Detection Routines
Demoschool Asm Tutorial
Intel Asm Secrets
80x86 Instruction Set
Paul's x86 Assembly Page
Advanced x86 Programming
Intro to Assembly
Garbo Asm Programs
Sourcer Disassembler
x86 Assembly Language FAQ
8088-80486 instruction set (with timings)
Optimizations for Pentium
Ice-Digga's Programming
The 80x86 Assembly Pages
An Introduction to Hardware Systems
Assembly Language Tutorials
Assembly Gems


Java

Java is a very high-level, object-oriented programming language developed by Sun Microsystems. It is relatively easy to understand if you know C. Like C/C++, it is a compiled language, but it will run on a multitude of platforms. Java programs are compiled into class files that contain what is known as byte-codes, which are not specific to a certain operating system or processor. Java is used for writing both applets, which are mini-programs that run within web browsers, and applications, which are stand-alone. However there is a trade-off to Java's cross-platform functionality: it is quite slow compared to programs written in C.

Java "Hello World" Applet

	/* 
	* The HelloWorldApp class implements an application that
	* simply displays "Hello World!" to the standard output.
	*/
               class HelloWorldApp {
                   public static void main(String[] args) {
                       System.out.println("Hello World!"); //Display the string.
                   }
               }

Links
Sun's Java Page
Gamelan
JavaShareware
The Java Repository
The Java Centre
Java Developer's Page
Professor Sullivan's Java Tutorial
Java Optimization
Java API Docs
The Caffeine Connection
Don's Java Central
Class Warehouse
Java Security
Setting Up and Using the Java Developer's Kit
Java FAQ Archives
The Java Tutorial
JavaWorld Online Magazine
Obligatory Java Applets
Ask the Java Pro
Java Virtual Library


Perl

Perl is a high-level interpreted language derived from C and many other languages. It is extremely efficient at scanning and extracting data from text files and thus commonly used for CGI scripting. Perl is also excellent for shell-scripting on Unix systems, and is used in a variety of other applications. If you've programmed before in C it should be easy to learn.

Perl "Hello World" Program

	#!/usr/local/bin/perl
	# .../Perl/hello.pl
	#
	# Purpose: Basic "Hello, world" program
	# Reference: Schwartz, Learning Perl, O'Reilly, p. 6.
	#
	# Illustrates:
	#   First line is required, it means "This is a Perl program"
	#   # denotes comments
	print "Basic Hello, world program.\n";
	print "Hello, world!\n";

Links
The Perl Language Home Page
Perl FAQ
References for Learning Perl
WebScripts
The Perl Institute
University of FL Script Archive
Programmer's Perl Resources
Comprehensive Perl Archive Network
Perl for Windows
Matt's Script Archive
Simplied Wrapper and Interface Generator
Perl.net
Using Perl
Perl Tutorial
Perl Man Pages



© 1998 Acid_burn